<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		Broadcastweb.eu - Paules												/
/	Site:			http://www.broadcastweb.eu												/
/	Email:			support@broadcastweb.eu													/
/	Copyright:		2011 - 2012 (c) Broadcastweb.eu											/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0003																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla Security
defined('_JEXEC') or die;
jimport('joomla.application.component.view');

class JooSamViewXmldata extends Jview{

	// Display function
	function display($tpl = null){

		$jsm_helper = new JooSamHelper();
		$samdb = new samdbo();
		$params = $jsm_helper->Params();
		$settings = $jsm_helper->config();
		$getData = new jsm_get();

		// Load Joomla errors/messages
		if (count($errors = $this->get('Errors'))){
			JError::raiseError(500, implode('<br />', $errors));
			return false;
		}

		$this->params = $params;
		$this->settings = $settings;
		$this->samdb = $samdb;
		$this->getdata = $getData;
		//$params->default_textcolor = $params->get('txt_default_color');

		// Load data
		$this->setDocument();
		parent::display($tpl);
		//$samdb->close();
	}

	protected function setDocument() 
	{
		$document = JFactory::getDocument();
		$document->setMimeEncoding( 'text/xml' );
	}
}